<template>
	<view>	
		<view class="status_bar" :style="{'backgroundColor':backgroundColor}"></view>
		<uni-nav-bar :left-icon="'back'" :left-text="'返回'"  @click-left="clickLeft" :backgroundColor="backgroundColor" :color="'#FFFFFF'" :border="false" :shadow="false"></uni-nav-bar>
		<view class="box" :style="{'backgroundColor':backgroundColor}">
			<view class="rowMiddle" v-if="stu == 1">
				<image src="../../static/cart/checked.png" mode=""></image>付款成功
			</view>
			<view class="rowMiddle" v-else>
				<image src="../../static/cart/checked.png" mode=""></image>付款失败
			</view>
		</view>
		<view class="order_date">
			<!-- <view>订单编号：13265465456</view> -->
			<view>实付金额：{{pay_price}}元</view>
		</view>
		<!-- <view class="tip">支付遇到问题，请在次选择支付方式</view>
		<view class="uni-list" style="margin-bottom:20upx;">
			<radio-group @change="radioChange">
				<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
					<view>
						<image src="/static/img/share/wx.png" mode="" style="width:80upx;height:80upx;vertical-align: middle;margin:0 20rpx;"></image>
						<text>{{item.name}}</text>
					</view>
					<view>
						<radio :value="item.value" :checked="index === current" />
					</view>
				</label>
			</radio-group>
		</view> -->
		<view class="footerBut">
			<!-- <view @click="order">查看订单</view> -->
			<view @click="home">回首页</view>
			<view @click="back" v-if="stu==0">返回支付</view>
		</view>
	</view>
</template>

<script>
	import uniNavBar from "@/components/uni-nav-bar/uni-nav-bar.vue";
	
	export default {
		components: {uniNavBar},
		data(){
			return {
				pay_price:'',
				stu:1,
				backgroundColor:'red',
				strText:'付款成功',
				
				current:1,
				items: [{
						value: 'USA',
						name: '支付宝'
					},
					{
						value: 'CHN',
						name: '微信',
						checked: 'true'
					}
				],
			};
		},
		onLoad(option) {
			this.pay_price = option.pay_price;
			this.stu = option.stu
			if(option.stu==1){
				this.backgroundColor = 'red';
			}else{
				this.backgroundColor = 'red';
			}
			
		},
		methods:{
			back(){
				uni.navigateBack({
					delta:1
				});
			},
			home(){
				uni.switchTab({
				    url: '/pages/shopPages/index'
				});
			},
			clickLeft(){
				uni.navigateBack({
					delta:1
				})
			},
			radioChange(){
				// console.log('radioChange')
			}
		}
		
	}
</script>

<style>
	.status_bar {
	    height: var(--status-bar-height);
	    width: 100%;
		background:#A4C859;
	 }
	 .box{
		 height:350upx;
		 background:#A4C859;
	 }
	 .rowMiddle{
		 font-size: 50upx;
		 color: #fff;
		 text-align: center;
		 line-height:300upx;
	 }
	 .rowMiddle image{
		width:50upx;
		height:50upx;
		vertical-align: middle;
		margin-right: 20upx;
	 }
	 
	 .order_date{
		 padding:0 20upx 20upx 20upx;
		 background:#fff;
		 margin-bottom:20upx;
	 }
	 .order_date>view{
		 padding-top:20upx;
	 }
	 
	 .tip{
		 background:#FFFFFF;
		 padding:20upx;
		 color:#999999;
	 }
	 
	.footerBut{
		position:fixed;
		bottom:0;
		text-align: center;
		display: flex;
		height:88upx;
		width:100%;
		border-top:1upx solid #CCCCCC;
	}
	.footerBut>view{
		line-height: 88upx;
		border-right:1upx solid #CCCCCC;
		flex: 1;
	}
	.footerBut>view:last-child{
		border-right:0;
	}

</style>
